<!doctype html>
<html>
<head>
<meta charset="UTF-8" />
<title>个人设置</title>  
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" />
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="format-detection" content="telephone=no">
<link rel="stylesheet" type="text/css" href="__PUBLIC__/Wx/css/base.css" />
<link rel="stylesheet" type="text/css" href="__PUBLIC__/Wx/css/detail.css" />
</head>

<body>
    <form action="<?=U('MySet/bind')?>" method="post" class="js_form">
        <div class="detail">
            <div class="write">
                <ul>
                    <li><span>手机号</span>
                        <input type="text" placeholder="请输入手机号" style="width:40%;" required/>
                        <input type="button" value="获取验证码" style="background:#ff4400; font-size:14px; color:#fff; display:inline-block; width:28%; float:right; border-radius:2px; height:40px; margin-top:5px;"/>
                    </li>
                    <li>
                        <span>验证码</span><input type="text" placeholder="请输入验证码" required/>
                    </li>
                </ul>
            </div>
            <div class="button"><input type="submit" value="提交"/></div>
        </div>
    </form>

    <!--引入js-->
    <script src="__PUBLIC__/Wx/js/jquery.js" ></script>
    <script src="__PUBLIC__/js/jquery.form.js"></script>
    <script src="__PUBLIC__/js/layer/layer.js"></script>

    <script>
        //表单提交
        $(".js_form").ajaxForm({
            //定义返回JSON数据，还包括xml和script格式
            dataType: 'json',
            success: function(data) {
                //提交成功后调用
                if(data.status==1) {
                    layer.msg(data.info, {icon:1,time:1000},
                        function(){
                            window.location.href= data.url;
                        });
                }else{
                    layer.msg(data.info, {icon:2,time:1000});
                }
            }
        });
    </script>

</body>
</html>